package com.ruoyi.project.baozhi.dept.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.baozhi.dept.mapper.OrgDeptMapper;
import com.ruoyi.project.baozhi.dept.domain.OrgDept;
import com.ruoyi.project.baozhi.dept.service.IOrgDeptService;
import com.ruoyi.common.utils.text.Convert;

/**
 * deptService业务层处理
 * 
 * @author ruoyi
 * @date 2021-12-10
 */
@Service
public class OrgDeptServiceImpl implements IOrgDeptService 
{
    @Autowired
    private OrgDeptMapper orgDeptMapper;

    /**
     * 查询dept
     * 
     * @param deptId dept主键
     * @return dept
     */
    @Override
    public OrgDept selectOrgDeptByDeptId(String deptId)
    {
        return orgDeptMapper.selectOrgDeptByDeptId(deptId);
    }

    /**
     * 查询dept列表
     * 
     * @param orgDept dept
     * @return dept
     */
    @Override
    public List<OrgDept> selectOrgDeptList(OrgDept orgDept)
    {
        return orgDeptMapper.selectOrgDeptList(orgDept);
    }

    /**
     * 新增dept
     * 
     * @param orgDept dept
     * @return 结果
     */
    @Override
    public int insertOrgDept(OrgDept orgDept)
    {
        return orgDeptMapper.insertOrgDept(orgDept);
    }

    /**
     * 修改dept
     * 
     * @param orgDept dept
     * @return 结果
     */
    @Override
    public int updateOrgDept(OrgDept orgDept)
    {
        return orgDeptMapper.updateOrgDept(orgDept);
    }

    /**
     * 批量删除dept
     * 
     * @param deptIds 需要删除的dept主键
     * @return 结果
     */
    @Override
    public int deleteOrgDeptByDeptIds(String deptIds)
    {
        return orgDeptMapper.deleteOrgDeptByDeptIds(Convert.toStrArray(deptIds));
    }

    /**
     * 删除dept信息
     * 
     * @param deptId dept主键
     * @return 结果
     */
    @Override
    public int deleteOrgDeptByDeptId(String deptId)
    {
        return orgDeptMapper.deleteOrgDeptByDeptId(deptId);
    }
}
